using System.Configuration;

namespace Unity.Extensions
{
    public class InterceptionMethodConfiguraitonElement : ConfigurationElement
    {
        [ConfigurationProperty("handlers")]
        [ConfigurationCollection(typeof(InterceptionMethodConfigurationElementCollection), AddItemName = "handler")]
        public InterceptionHandlerConfigurationElementCollection Handlers
        {
            get { return (InterceptionHandlerConfigurationElementCollection)this["handlers"]; }
        }

        [ConfigurationProperty("name")]
        public string Name
        {
            get { return (string)this["name"]; }
            set { this["name"] = value; }
        }

        [ConfigurationProperty("type", IsRequired = false)]
        public string MethodType
        {
            get { return (string)this["type"]; }
            set { this["type"] = value; }
        }
    }
}